import pygame
from OpenGL.GL import glTranslatef
# 每秒旋转10°
rotation_speed = 30

rotation_degree_x = 0
rotation_degree_y = 0
rotation_degree_z = 0



def get_3_axises_rotation(dt)->tuple:

    global rotation_degree_x,rotation_degree_y,rotation_degree_z

    keys = pygame.key.get_pressed()
    if keys[pygame.K_w]:
        rotation_degree_x+=rotation_speed*dt
    if keys[pygame.K_s]:
        rotation_degree_x-=rotation_speed*dt
    if keys[pygame.K_a]:
        rotation_degree_y+=rotation_speed*dt
    if keys[pygame.K_d]:
        rotation_degree_y-=rotation_speed*dt
    if keys[pygame.K_q]:
        rotation_degree_z+=rotation_speed*dt
    if keys[pygame.K_e]:
        rotation_degree_z-=rotation_speed*dt   


    return [rotation_degree_x,rotation_degree_y,rotation_degree_z]